home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / complib.idb / usr / share / catman / p_man / cat3 / complib / fft1du.z / fft1du
Text File  |  1996-03-14  |  7KB  |  133 lines

  1.  
  2.  
  3.  
  4. ssssccccfffffffftttt1111dddduuuu,,,,ddddzzzzfffffffftttt1111dddduuuu((((3333FFFF))))                                    ssssccccfffffffftttt1111dddduuuu,,,,ddddzzzzfffffffftttt1111dddduuuu((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ssssccccfffffffftttt1111dddduuuu,,,, ddddzzzzfffffffftttt1111dddduuuu ---- 1D, Real to Complex, Direct Fast Fourier Transforms.
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
  12.      _F_o_r_t_r_a_n :
  13.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ssssccccfffffffftttt1111dddduuuu(((( ssssiiiiggggnnnn,,,, nnnn,,,, aaaarrrrrrrraaaayyyy,,,, iiiinnnncccc,,,, ccccooooeeeeffffffff ))))
  14.           iiiinnnntttteeeeggggeeeerrrr ssssiiiiggggnnnn,,,, nnnn,,,, iiiinnnncccc
  15.           rrrreeeeaaaallll aaaarrrrrrrraaaayyyy((((0000::::((((2222****((((((((NNNN++++2222))))////2222))))----1111))))****iiiinnnncccc)))),,,, ccccooooeeeeffffffff((((nnnn++++11115555))))
  16.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ddddzzzzfffffffftttt1111dddduuuu(((( ssssiiiiggggnnnn,,,, nnnn,,,, aaaarrrrrrrraaaayyyy,,,, iiiinnnncccc,,,, ccccooooeeeeffffffff ))))
  17.           iiiinnnntttteeeeggggeeeerrrr ssssiiiiggggnnnn,,,, nnnn,,,, iiiinnnncccc
  18.           rrrreeeeaaaallll****8888 aaaarrrrrrrraaaayyyy((((0000::::((((2222****((((((((NNNN++++2222))))////2222))))----1111))))****iiiinnnncccc)))),,,, ccccooooeeeeffffffff((((nnnn++++11115555))))
  19.  
  20.      _C :
  21.      ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
  22.      iiiinnnntttt ssssccccfffffffftttt1111dddduuuu (((( iiiinnnntttt ssssiiiiggggnnnn,,,, iiiinnnntttt nnnn,,,, ffffllllooooaaaatttt ****aaaarrrrrrrraaaayyyy,,,,
  23.                iiiinnnntttt iiiinnnncccc,,,, ffffllllooooaaaatttt ****ccccooooeeeeffffffff))));;;;
  24.      iiiinnnntttt ddddzzzzfffffffftttt1111dddduuuu (((( iiiinnnntttt ssssiiiiggggnnnn,,,, iiiinnnntttt nnnn,,,, ddddoooouuuubbbblllleeee ****aaaarrrrrrrraaaayyyy,,,,
  25.                iiiinnnntttt iiiinnnncccc,,,, ddddoooouuuubbbblllleeee ****ccccooooeeeeffffffff))));;;;
  26.  
  27.  
  28. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  29.      ssssccccfffffffftttt1111dddduuuu and ddddzzzzfffffffftttt1111dddduuuu compute the Fourier transform of a real sequence.
  30.      The k-th index F(k) of the Fourier transform of a real sequence f(i) is
  31.      equal to:
  32.           F(k) = Sum ( W^(i*k) * f(i) ), for i =0, ..., (N-1)
  33.                W = exp( (Sign*2*sqrt(-1)*PI) / N )
  34.  
  35.  
  36.      The Direct Fourier transform is performed in-place, so the input sequence
  37.      is overwritten by its Fourier transform. As the input sequence has real
  38.      values, only the first half of the transform is needed. The (N-k)-th
  39.      sample of the transform would be the conjugate of the k-th sample.
  40.  
  41.      However, some extra space is necessary. For an N sample sequence, the
  42.      output complex transform takes ((N+2)/2) complex values.  This represents
  43.      either N+1(odd case) or N+2(even case) real values, that's one or two
  44.      more real values than the input real sequence.
  45.  
  46.  
  47. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  48.      SSSSIIIIGGGGNNNN Integer specifying which sign to be used for the expression of W
  49.      (see above) - must be either +1 or -1.
  50.      Unchanged on exit.
  51.  
  52.      NNNN Integer, the number of samples in each sequence.
  53.      Unchanged on exit.
  54.  
  55.      AAAARRRRRRRRAAAAYYYY Array containing the samples of the sequence to be transformed.
  56.      On input, the element "i" of the sequence is stored as A(i*inc) in
  57.      _F_o_r_t_r_a_n , and A[i*inc] in _C.
  58.      On exit, the array is overwritten by its transform.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ssssccccfffffffftttt1111dddduuuu,,,,ddddzzzzfffffffftttt1111dddduuuu((((3333FFFF))))                                    ssssccccfffffffftttt1111dddduuuu,,,,ddddzzzzfffffffftttt1111dddduuuu((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      IIIINNNNCCCC Integer, increment between two consecutive elements of a sequence.
  75.      Unchanged on exit.
  76.  
  77.      CCCCOOOOEEEEFFFFFFFF Array of at least ( N + 15 ) elements.  On entry it contains the
  78.      Sines/Cosines and factorization of N. COEFF needs to be initialized with
  79.      a call to scfft1dui or dzfft1dui.
  80.      Unchanged on exit.
  81.  
  82.  
  83. EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
  84.      Direct Fourier Transform of a sequence of 1024 real values.  Elements of
  85.      sequence are stored with increment (stride) 1.
  86.      _F_o_r_t_r_a_n
  87.           real array(0:1026-1), coeff(1024+15)
  88.           call scfft1dui( 1024, coeff)
  89.           call scfft1du( -1, 1024, array, 1, coeff)
  90.  
  91.      _C
  92.           #include <fft.h>
  93.           float array[1026], *coeff;
  94.           coeff = scfft1dui( 1024, NULL);
  95.           scfft1du( -1, 1024, array, 1, coeff);
  96.  
  97. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  98.      fft, scfft1dui, dzfft1dui, csfft1du, zdfft1du
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.